#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    void moveZeroes(vector<int>& nums) {
        for (int left = -1, right = 0; right < nums.size(); right++) {
            if (nums[right] != 0) {
                left++;
                swap(nums[left], nums[right]);
            }
        }
    }
};